package com.jeln.dao;


import com.jeln.po.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


import java.util.List;


public interface TagRepository extends JpaRepository<Tag,Long> {

    //校验tag的名称
    Tag findByName(String name);

    //前端展示标签
    @Query("select t from Tag t")
    List<Tag> findTop(Pageable pageable);
}
